home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / lockd.z / lockd
Encoding:
Text File  |  2001-04-17  |  5.8 KB  |  133 lines

  1.  
  2.  
  3.  
  4. lllloooocccckkkkdddd((((1111MMMM))))                                                            lllloooocccckkkkdddd((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      lockd - NFS lock daemon
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////uuuussssrrrr////eeeettttcccc////rrrrppppcccc....lllloooocccckkkkdddd [ ----gggg _g_r_a_c_e_p_e_r_i_o_d ] [ ----llll ] [ _n_s_e_r_v_e_r_s ]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _l_o_c_k_d provides the inherently stateful locking services within the
  16.      stateless NFS environment.  It allows the locking of records and files
  17.      between applications running on different physical machines sharing the
  18.      same filesystems mounted with NFS.  _n_s_e_r_v_e_r_s is the number of lockd
  19.      servers to start.
  20.  
  21.      Locks are presently advisory only.  The lock style implemented by _l_o_c_k_d
  22.      is that specified in the SVID (see _l_o_c_k_f(3C) and _f_c_n_t_l(2)).  There is no
  23.      interaction between the _l_o_c_k_d's locks and _f_l_o_c_k(3B) style locks.
  24.  
  25.      _l_o_c_k_d is started during system initialization if the _c_h_k_c_o_n_f_i_g(1M) lllloooocccckkkkdddd
  26.      flag is set on.  Command-line options belong in
  27.      /_e_t_c/_c_o_n_f_i_g/_l_o_c_k_d._o_p_t_i_o_n_s.
  28.  
  29.      If _n_f_s_d(1M) is running, _l_o_c_k_d registers its RPC services and exits,
  30.      leaving _n_f_s_d to handle the requests.
  31.  
  32.      _l_o_c_k_d processes lock requests that are either sent locally by the kernel
  33.      or remotely by another lock daemon.  In the case of local lock requests
  34.      for remote data, _l_o_c_k_d forwards the lock requests to the server site's
  35.      lock daemon through the _R_P_C/_X_D_R(3R) package.  _l_o_c_k_d then requests the
  36.      local status monitor daemon, _s_t_a_t_d(1M), for monitor service of the
  37.      server.  The reply to the lock request is not sent to the kernel until
  38.      the status daemon and the server site's lock daemon have replied.
  39.  
  40.      When a server recovers, it waits for a grace period for all client site
  41.      _l_o_c_k_ds to submit reclaim requests.  Client site _l_o_c_k_ds are notified by
  42.      the _s_t_a_t_d of the server recovery and promptly resubmit previously granted
  43.      lock requests.  If a _l_o_c_k_d fails to secure a previously granted lock at
  44.      the server site, it sends SIGUSR1 to the application process.  The
  45.      process must explicitly handle this signal if the loss of a lock should
  46.      cause it to terminate.
  47.  
  48. OOOOPPPPTTTTIIIIOOOONNNNSSSS
  49.      ----gggg _g_r_a_c_e_p_e_r_i_o_d   _l_o_c_k_d uses _g_r_a_c_e_p_e_r_i_o_d (seconds) as the grace period
  50.                       duration instead of the default value (see TTTTUUUUNNNNIIIINNNNGGGG
  51.                       below).
  52.  
  53.      ----llll               Set SVID locks for files which are locked by DOS
  54.                       machines running PC-NFS and compatible file sharing
  55.                       utilities.  Normally, _l_o_c_k_d does not set SVID locks for
  56.                       such requests.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. lllloooocccckkkkdddd((((1111MMMM))))                                                            lllloooocccckkkkdddd((((1111MMMM))))
  71.  
  72.  
  73.  
  74. TTTTUUUUNNNNIIIINNNNGGGG
  75.      _l_o_c_k_d has four tunable parameters:  _l_o_c_k_d__g_r_a_c_e__p_e_r_i_o_d,
  76.      _l_o_c_k__s_h_a_r_e__r_e_q_u_e_s_t_s, _n_l_m__g_r_a_n_t_e_d__t_i_m_e_o_u_t, and _n_l_m__m_a_x_d_u_p_r_e_q_s.
  77.      _l_o_c_k_d__g_r_a_c_e__p_e_r_i_o_d controls the starup grace period for the reclaiming of
  78.      locks.  This was previously controlled by the -g command line option.
  79.      _L_o_c_k__s_h_a_r_e__r_e_q_u_e_s_t_s tells _l_o_c_k_d to preform UNIX file locking for share
  80.      and unshare requests.  _N_l_m__g_r_a_n_t_e_d__t_i_m_e_o_u_t controls the timeout used in
  81.      making NLM_GRANTED and NLMPROC_GRANTED callbacks for blocked lock
  82.      requests which have been granted.  This value is specified in tenths of a
  83.      second.  _N_l_m__m_a_x_d_u_p_r_e_q_s controls how many NLM RPC duplicate request cache
  84.      entries are allocated.  The default setting is 0.  This causes the
  85.      allocation to be sized based upon the memory size of the system.
  86.  
  87. NNNNOOOOTTTTEEEESSSS
  88.      The reply to a lock request for remote data is delayed until all daemons
  89.      become available.
  90.  
  91.      In the Sun implementation, _l_o_c_k_d sends SIGLOST.  when a lock is lost.
  92.      The IRIX implementation sends SIGUSR1.  Programs should establish a
  93.      signal handler to catch this signal and exit.
  94.  
  95.      For client operations, _l_o_c_k_d is no longer used as the intermediary for
  96.      NLM RPCs.  The kernel makes the RPCs to the server directly.  These calls
  97.      all use UDP.  There is no support for TCP as a transport for NLM RPCs on
  98.      the client side.
  99.  
  100.      Since NLM RPCs are handled by the NFS server _n_f_s_d, both TCP and UDP are
  101.      accepted as transports on the server side.  For blocked lock requests,
  102.      however, the NLM_GRANTED or NLM_GRANTED_MSG RPC will be sent using UDP
  103.      regardless of what transport the client used.
  104.  
  105. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  106.      statd(1M), fcntl(2), signal(2), lockf(3C).
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.